home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-04 | 2.4 KB | 88 lines | [TEXT/KAHL] |
- //--------------------------------------------------------------------------
- //
- // MyApplication.
- // by John Wang
- //
- // Description: Sample Application.
- //
- // Version: 1.0 09/07/93 Not perfect, but done.
- //
- //--------------------------------------------------------------------------
-
- // #includes
-
- #include <Movies.h>
-
- // #defines
-
- #define NEWDOCATSTARTUP 1 // set to 1 if MyNew called at startup. 0 is not called.
- #define MYEVENTDEF 2 // 2 is per window. 1 is once per eventloop. 0 is never.
- #define MYIDLEDEF 2 // 2 is per window. 1 is once per eventloop. 0 is never.
- #define MAS_WINDOWDOC 1000
- #define MAS_WINDOWCLIP 1002
-
- #define MENU_COLLECTION 160
- #define MENU_MACADDRESATOM 2
- #define MENU_MACADDALL 3
- #define MENU_CROSSADDALL 6
- #define MENU_BOTHADDALL 9
-
- #define MENU_MOVIES 161
-
- #define ALERT_ERROROPEN 160
- #define ALERT_BADDOCUMENT 161
- #define ALERT_CANTNEW 162
- #define ALERT_CANTOPEN 163
- #define ALERT_SELECTEDMOVIE 164
-
- //--------------------------------------------------------------------------
-
- // Globals.
-
- extern Boolean gDoneFlag;
-
- //--------------------------------------------------------------------------
-
- // Prototypes.
-
- OSErr MyInitialize(void);
- Boolean MyEvent(WindowPtr theWindow, EventRecord *myEvent);
- void MyIdle(WindowPtr theWindow);
- OSErr MyDoCommand(short theMenu, short theItem);
- void MyDoKeyDown(EventRecord *myEvent);
- void MyDraw(WindowPtr theWindow);
- void MyFinishup(void);
- long MyYieldTime(long message);
- void MyInContent(WindowPtr foundWindow, Point where);
- void MyZoomWindow(WindowPtr foundWindow, Boolean zoomOut);
- void MyAdjustMenus(void);
-
- void MyNew(void);
- void MyOpen(FSSpec *theFSS);
- void MyClose(void);
- void MySave(void);
- void MySaveAs(void);
- void MyPageSetup(void);
- void MyPrint(void);
-
- void MyUndo(void);
- void MyCut(void);
- void MyCopy(void);
- void MyPaste(void);
- void MyClear(void);
- void MySelectAll(void);
-
- Boolean IsMyWindow(WindowPtr theWindow);
- void SetMyWindow(WindowPtr theWindow);
- Boolean IsMyClipWindow(WindowPtr theWindow);
- void SetMyClipWindow(WindowPtr theWindow);
-
- void adjustMoviesMenu(WindowPtr theWindow);
- void SelectThisMovie(short item);
-
- void getNewMovie(Movie *theMovie, Str255 *movieName);
- void Mac_AddMovieResAtom(short *docRefNum, FSSpec *docFSSpec);
- void Mac_AddMovieAll(short *docRefNum, FSSpec *docFSSpec);
- void Cross_AddMovieAll(short *docRefNum, FSSpec *docFSSpec);
- void Both_AddMovieAll(short *docRefNum, FSSpec *docFSSpec);
-